-- No recuperar los artm con artm.nrolote = NULL

CREATE OR REPLACE VIEW public.vstklote AS 
 SELECT artm.idart,
    artm.nrolote,
    artm.fechalote,
    sum(artm.signo::numeric * artm.cant) AS cant
   FROM artm
   WHERE artm.nrolote IS NOT NULL
   GROUP BY artm.idart, artm.nrolote, artm.fechalote;

ALTER TABLE public.vstklote OWNER TO abacouser;


-- =======================================
SELECT aaVersion('431.01','431.00');
-- =======================================